﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace FileDuplicateRemover.Core
{
    public class DirectoryEntity : BaseEntity
    {
        public List<BaseEntity> EntityList { get; set; }

        public long TotalEntityCount { get; set; }

        public DirectoryEntity(string fullName) : base(fullName)
        {
            this.EntityList = new List<BaseEntity>();
        }

        public override bool Equals(BaseEntity other)
        {
            if (other != null && other is DirectoryEntity)
                return EqualsCore(other as DirectoryEntity);
            else
                return false;
        }

        private bool EqualsCore(DirectoryEntity de)
        {
            bool res = this == de;

            if (!res)
            {
                res = this.Length == de.Length && this.TotalEntityCount == de.TotalEntityCount;

                if (res)
                {
                    
                }
            }

            return res;
        }
    }
}
